home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Games Collection 1
/
software vault.zip
/
software vault
/
CDR09
/
TRUCKER.ZIP
/
TRUCKER.CMD
Wrap
OS/2 REXX Batch file
|
1993-02-28
|
60KB
|
1,773 lines
/* REXX */
/* ---------------------------------------------------------------------
TRUCKER in REXX February 28, 1993
------------------------------------------------------------------------
This is a game program, originally written in BASIC by Hughes Glantzberg
from Irving, Texas.
This version has been created based on the above program by Simon Husin
to show REXX program's flexibility and portability. This program is NOT
created for COMMERCIAL purposes. Commercial use of the materials in
this program requires permissions of Mr. Glantzberg and/or Mr. Husin.
TRUCKER in REXX has been tested to run problem-free on MVS/TSO, Unix,
OS/2, DOS, DOS/Windows, and Amiga platforms. For compatibility and
other matters please see notes at the end of this program.
Following the Main Program, the functions and subroutines in this
program are placed in the order of their names.
--------------------------------------------------------------------- */
/*
Main Program
============
*/
/*
Start Main Program Initialization
*/
call time 'R' /* Reset the elapse time for the entire program */
parse source shenv .
queue shenv
drop shenv
/*
End of Main Program Initialization
*/
call initial_environment
do while sh_keep_on_trucking
call ride_cross_country
end
say ' '
say 'End Of Game...'
say 'Thank you for playing T.R.U.C.K.E.R.'
exit
/* ------------------------------<End>------------------------------ */
/*
Subroutine to check obstacles or hindrance on the road
======================================================
*/
check_obstacles:
say 'You have just passed 'mpX.rt.np
zh = zm.rt.np
sl = 55
intzh = zh % 1
select
when intzh = 1 then do
say 'Time zone changes -- set clock ahead one hour.'
hr = hr + 1
call report_trip_duration hr
end
when intzh = 2 then do
t = 100 * (zh - intzh) % 1
if t > 0 then do
say 'STOP! Pay toll of $'t
xc = xc + t
end
end
when intzh = 3 then do
if rnd() >= zh - intzh then do
say 'Construction ahead !!'
call delay 150
say 'Slow down -- speed limit 35 MPH'
sl = 35
end
end
when intzh = 4 then do
if rnd() >= zh - intzh then do
t = sp + rnd() * 5 % 1 - 2
say 'You were just clocked by radar at 't'MPH.'
if t > sl + 3 then do
call got_caught_by_police
if sh_keep_on_trucking then
nop
else
return
end
else
say ' No ticket this time.'
end
end
when intzh = 5 then do
if zh = intzh &,
rnd() >= 0.5 |,
(zh < intzh | zh > intzh) &,
rnd() < zh - intzh then
nop
else do
say 'Weighing station open -- trucks must stop.'
call delay 150
say 'Scale weighs truck with cargo, fuel & driver: '
t = (19000 + wl + 7 * wf + 25 * rnd() * 10) % 1
say t' pounds.'
t = t - 68000 % 1 /* limit was 60000 */
if t < 1 then
say " You're O.K."
else if zh = 5 then do
say 'You are not allowed to enter Louisiana with that',
'load.'
say ' Take a 200 mile detour through Arkansas',
'with 45 MPH limit.'
sl = 45
mrX.rt.np = 'Arkansas country roads'
do i = 12 to 25
mp.rt.i = mp.rt.i + 200
end
mt.rt = mt.rt + 200
end
else do
t1 = (rnd() * 4 + 2) % 1
say ' Overweight fine is $200.00 plus 't1' cents/pound.'
xc = xc + 200 + (t * t1) / 100
say 'Pay fine of $'200 + (t * t1) / 100
end
end
end
when intzh = 6 then do
if rnd() >= zh - intzh then do
t = (rnd() * 6) % 1
say 'A rock slide has blocked the Alleghany Tunnel',
'entrance.'
say ' THE HIGHWAY DEPARTMENT WILL HAVE IT',
'CLEARED IN 'T' HOURS.'
hr = hr + t
call delay 150
hsw1 = 1
if ct = 1 then do
wf = wf - 7 * t
if wf <= 1 then do
say ' You ran out of gas while waiting...'
t = 0
call wait_for_gas
hsw1 = 0
end
end
if hsw1 then do
if t > 1 then
t1 = (t / 2 + 0.5) % 1
else
t1 = 0
if t1 > 3 then
hl = 0
else if t1 > 0 then
hl = hl / 2
hs = hs + t1
say ' While waiting, you got 't1' hours of sleep...'
call report_trip_duration hr
end
end
end
when intzh = 7 then do
if ct = 1 &,
rnd() >= zh - intzh then do
say 'The trailer refrigeration unit has failed endangering',
'the cargo.'
say ' Repairs take 2 hours and cost $100.00.'
cx = cx + rnd() * 5 % 1
hl = hl + 2
hr = hr + 2
xc = xc + 100
call report_trip_duration hr
call delay 400
end
end
when intzh = 8 then
call end_of_trip
otherwise
nop
end
np = np + 1
call delay 150
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to check operating system environment and initial system
specific commands for local system interpret(ation)
===================================================================
*/
check_operating_system: procedure expose rxbeep rxcls rxenv rxext rxpull
parse version interpreter version release
addr = address()
parse pull env
/* parse source env . */
rxenv = env' @ 'addr' Running:'interpreter' Ver/Rel:'version'/'release
rxext = "say center('Press Enter to start the game...', 79)"
interpreter = translate(interpreter)
addr = translate(addr)
select
when interpreter = 'REXX370' then do
/* Welcome to the IBM Mainframe */
select
when addr = 'MVS' then do /* MVS */
say 'Sorry!'
say 'This program is not intended to be used in the'
say 'MVS Batch (IRXJCL) environment.'
exit 10
end
when addr = 'TSO' then do /* TSO/E */
if strip(sysvar('sysenv')) = 'FORE' then do
rxcls = "'clrscrn'"
rxbeep = 'nop'
rxpull = 'pull shstr'
end
else do
say 'Sorry!'
say 'This program is not intended to be used in the'
say 'TSO Batch (IKJEFT01) environment.'
exit 20
end
end
otherwise /* VM/CMS */
rxcls = 'clear'
rxbeep = 'nop'
rxpull = 'pull shstr'
end
end
when interpreter = 'UNI-REXX' then do
/* Welcome to a Unix/AIX Workstation */
/* The Workstation Group (wrk/grp) uni-REXX */
rxcls = "'clear'"
rxbeep = "'echo "d2c(7)"'" /* ANSI ESC seq. char. (BELL) */
rxpull = 'pull shstr'
end
when interpreter = 'REXXSAA' then do
/* Welcome to the IBM PL 2/REXX */
if addr \= 'CMD' then /* To avoid problems when run under */
exit 30 /* an unknown environment */
rxbeep = 'result = beep(shf, shd * 1.5 % 1)'
rxcls = "'cls'"
say '1B'x || '[1;36;44m' /* ESC[36;44m light cyan on blue */
if word(release, 3) < 1992 then do
'echo off'
rxpull = 'shstr = translate(linein(con))'
rxenv = rxenv '(16-bit)'
end
else do
'@echo off'
call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
call sysloadfuncs
rxpull = 'pull shstr'
rxenv = rxenv '(32-bit)'
rxext = 'call truckos2'
end
end
when interpreter = 'REXX/PERSONAL' then do
/* Welcome to the Quercus Systems REXX world */
if addr = 'CMD' then do /* under OS/2 */
say '1B'x || '[1;36;44m' /* ESC[36;44m light cyan on blue */
rxcls = 'result = scrwrite(1,1,,2000,,27) cursor(1,1)'
rxbeep = 'result = sound(shf, shd / 700)' /* or beep */
rxpull = 'pull shstr'
if version <= 2 then
rxenv = rxenv '(16-bit)'
else
rxenv = rxenv '(32-bit)'
rxext = 'call truckper'
end
else if addr = 'DOS' then do /* under PC/MS-DOS */
rxcls = 'result = scrwrite(1,1,,2000,,27) cursor(1,1)'
rxbeep = 'result = sound(shf, shd / 700)' /* or beep */
rxpull = 'pull shstr'
rxext = 'call truckper'
end
else if addr = 'WINREXX' then do /* under MS-Windows or
IBM WinOS2 */
rxcls = "'cls'"
rxbeep = 'result = sound(shf, shd / 700)' /* or beep */
rxpull = 'pull shstr'
end
else do /* unknown env. */
rxcls = "do 25;say ' ';end"
rxbeep = 'result = sound(shf, shd / 700)' /* assumed! */
rxpull = 'pull shstr'
end
end
when left(interpreter, 9) = 'REXX-KILO' then do /* PC/MS-DOS */
/* Welcome to the Kilowatt Software Portable/REXX */
rxcls = "'cls'"
rxbeep = 'result = tone(shf, shd / 700)'
rxpull = 'pull shstr'
rxext = 'call truckpor'
end
when left(interpreter, 9) = 'REXX/WIND' then do /* Windows/Win-OS2 */
/* Welcome to the Kilowatt Software REXX/Windows */
rxcls = "'cls'"
rxbeep = 'result = tone(shf, shd / 700)'
rxpull = 'pull shstr'
end
when interpreter = 'REXX/PC' then do
/* Welcome to the Tritus REXX under DOS TSPF */
rxcls = "'cls'"
rxbeep = 'nop'
rxpull = 'pull shstr'
end
when interpreter = 'AREXX' then do
/* Welcome to the Amiga Micro Computer w/ ARexx */
rxcls = "result = writech('STDOUT', '1B'x" || '"[2J")'
/* ANSI ESC seq. char. (CLS) */
rxbeep = "result = writech('STDOUT', '07'x)"
/* ANSI ESC seq. char. (BELL) */
rxpull = 'pull shstr'
end
otherwise
/* Welcome to ... computer environment */
rxcls = 'nop' /* with your ... REXX interpreter/compiler */
rxbeep = 'nop'
rxpull = 'pull shstr'
end
interpret rxcls
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to check the mood & physical condition of the trucker
================================================================
*/
check_trucker_condition:
if hl > 19 |,
hr / hs > 4 then do
cd = 100
cdX = '..E.X.H.A.U.S.T.E.D..'
end
else if hl < 4 &,
cos(hr / (hs * 1.819)) > 0 then do
cd = 1
cdX = 'rested & rearing to go.'
end
else if hl < 8 &,
cos(hr / (hs * 1.892)) > 0 then do
cd = 2
cdX = 'fine'
end
else if hl < 12 &,
hr / hs <= 3 then do
cd = 4
cdX = ' b o r e d'
end
else if hl < 16 &,
hr / hs <= 3 then do
cd = 8
cdX = ' t i r e d !!'
end
else do
cd = 25
cdX = "fatigued...you're getting sleepy"
end
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to check the weather and driving condition and report its
description
====================================================================
*/
check_weather:
af = (3000 + mf) * rnd()
crX = 'clear & dry'
select
when rt = 0 then do
if af < 3400 &,
(cr < 50 | cr > 50) then
cr = 1
else if af > 4900 then do
cr = 50
crX = 'B-L-I-Z-Z-A-R-D !!'
end
else if af > 4700 then do
cr = 10
crX = 'fog -- limited visibility'
end
else if af > 4200 then do
cr = 5
if (rnd() * 3) % 1 + 1 = 1 then
crX = 'light snow'
else
crX = 'rain'
end
else do
cr = 3
crX = 'clear, but roadway is wet'
end
end
when rt = 1 then do
if af < 3300 &,
(cr < 50 | cr > 50) then
cr = 1
else if af > 4800 then do
cr = 50
crX = 'B-L-I-Z-Z-A-R-D !!'
end
else if af > 4600 then do
cr = 10
crX = 'fog -- limited visibility'
end
else if af > 3800 then do
cr = 5
crX = 'light snow'
end
else do
cr = 3
crX = 'clear, but roadway is wet'
end
end
otherwise do
if af < 4000 &,
(cr < 50 | cr > 50) then
cr = 1
else if af > 5700 then do
cr = 50
crX = 'B-L-I-Z-Z-A-R-D !!'
end
else if af > 5500 then do
cr = 10
crX = 'fog -- limited visibility'
end
else if af > 4400 then do
cr = 5
crX = 'rain'
end
else do
cr = 3
crX = 'clear, but roadway is wet'
end
end
end
return
/* ------------------------------<End>------------------------------ */
/*
Function to calculate the COSine of the argument X (in Radians)
===============================================================
According to algorithm: cos(x) = 1 - x**2/2! + x**4/4! - x**6/6! + ...
*/
cos: procedure
arg rad .
serrad = 1
serfactn = 0
serfact = 1
plusmin = 1
radquad = rad * rad
cosine = 1
do digits()
serrad = serrad * radquad
serfactn = serfactn + 2
serfact = serfact * (serfactn - 1) * serfactn
plusmin = 0 - plusmin
serprec = serrad / serfact * plusmin
if serprec = 0 then
leave
cosine = cosine + serprec
end
return cosine
/* ------------------------------<End>------------------------------ */
/*
Subroutine to delay processing for parameter 'timeout' hundredths
of a second
=================================================================
*/
delay: procedure
arg timeout
if timeout < 0.5 then
return
call time 'R' /* Reset the elapse time for this subroutine only */
hsec = (timeout + 0.5) / 100
do until hsec <= time('E')
end
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to handle the arrival at destination
===============================================
*/
end_of_trip:
interpret rxcls
say ' '
say center('WELCOME', 79)
call delay 100
say center('TO', 79)
call delay 100
say center('NEW YORK', 79)
call delay 250
call report_trip_duration hr
t = hr - (hr % 24)
if t < 10 &,
t > 21 then do
say 'The warehouse is closed...'
if t < 10 then
t = 10 - t
else
t = 34 - t
say 'Wait 'formatsim(t, 3)' hours until it opens...'
call delay 500
hr = hr + t
call report_trip_duration hr
end
say ' '
t = (hr / 24) % 1
t1 = hr - 24 * t
if t1 > 1 then
say 'You completed the trip in 't' days and 't1' hours.'
else
say 'You completed the trip in 't' days.'
say ' Trip expenses totaled $'xc
t1 = 85 * t + 85
say ' Truck payment, insurance and taxes cost $'t1
xc = xc + t1
xt = 0
say ' '
if ct = 1 then do
t1 = (t - 4) * (rnd() * 3) % 1
if t1 > 0 then
cx = cx + t1
if cx > 6 then
say 'Your oranges have spoiled. Haul them to the dump!'
else do
say 'Collect six-and-a-half cents per pound for good oranges.'
xt = 0.065 * wl
say ' Total for the load: $'xt
if cx >= 1 then do
say ' Part of the load is damaged. Subtract '5 * cx'%.'
xt = xt - xt * cx / 20
say ' Net payment is $'xt
end
end
end
else if ct = 2 then do
xt = 0.05 * wl
say 'Collect five cents a pound for freight.'
say ' Total for load is $'xt
if hr >= 95 then do
say " You're late!! Subtract ten percent penalty."
xt = xt * 0.9
say ' Net payment is $'xt
end
end
else do
say 'Postmaster pays 4.75 cents per pound on delivery.'
xt = 0.0475 * wl
end
say ' '
xt = xt - xc
if xt >= 0 then do
say 'Your net profit this trip was $'xt
if xt > 100 then
say ' G O O D W O R K !!'
if xt < 200 then
say " You'd make more money washing dishes !"
sh_keep_on_trucking = 0
end
else do
say 'Bad trip. . . You lost $'abs(xt)
say 'You are bankrupt !!!'
call delay 200
call give_up_truck
end
return
/* ------------------------------<End>------------------------------ */
/*
Function to return a specified number of digits before the decimal point
========================================================================
*/
formatsim:
arg number, before
shdigits = digits()
numeric digits before
shformattemp = number + 0
numeric digits shdigits
return shformattemp
/* ------------------------------<End>------------------------------ */
/*
Subroutine to request a numeric string from the console/keyboard
================================================================
*/
getnum: procedure expose rxenv rxpull
do forever
shnum = space(translate(getstr(), '', ','), 0)
if datatype(shnum, 'N') then
leave
end
return shnum
/* ------------------------------<End>------------------------------ */
/*
Subroutine to request a string of characters from the console/keyboard
======================================================================
*/
getstr: procedure expose rxenv rxpull
shstr = ''
interpret rxpull
if shstr = '*' then do /* allow user to exit at any time
by entering '*' at any prompt */
say 'Thank you for playing Trucker under...'
say rxenv
exit 0
end
return shstr
/* ------------------------------<End>------------------------------ */
/*
Subroutine to send a very sad message to the trucker...
=======================================================
*/
give_up_truck: procedure expose sh_keep_on_trucking
say ' '
say 'Your rig has been repossessed...'
call delay 250
sh_keep_on_trucking = 0
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to handle 'paper' work, i.e. financial, time and some other
more serious issues with the police for traffic violation
======================================================================
*/
got_caught_by_police:
say 'Smokey is behind you with his lights on. Pull over!'
shd = 400
do 3
shf = 3000
interpret rxbeep
shf = 2500
interpret rxbeep
end
nt = nt + 1
say 'See the justice of the peace for your 'ntX.nt' offense.'
say ' Wait 'nt' hours for your hearing...'
hl = hl + nt
hr = hr + nt
if nt <= 3 then do
t = (nt * (rnd() * 5)) % 1
t1 = (5 * (rt + nt * (rnd() * 4))) % 1
say ' The fine is $'t1' plus $'t' for each MPH over the limit.'
say ' Pay $'t1 + t * (sp - sl)
xc = xc + t1 + t * (sp - sl)
call delay (nt * 500)
return
end
say 'You are sentenced to 30 days in jail for reckless driving.'
call delay 300
say "Your I.C.C. driver's license is revoked !"
call give_up_truck
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to process flat tire problem
=======================================
*/
got_flat_tire:
shf = 3000
shd = 100
interpret rxbeep
do shw = 200 to 100 by - 50
shf = shw
shd = (200 / shf * 500) % 1
interpret rxbeep
shf = shw / 2
interpret rxbeep
end
say 'You just blew a tire !!'
if ts <= 0 then do
say 'Since your spare has already been used, you have to call a tow'
say 'truck'
say 'from town to deliver a new tire for you.'
say ' This service cost $400.00 and took 4 hours.'
hl = hl + 4
hr = hr + 4
xc = xc + 400
end
else do
ts = ts - 1
if ts < 0 then
ts = 0
tc = tc - 2 * ts
t = (rnd() * 2) % 1 + 1
if t = 1 then
tX = 'outside'
else
tX = 'inside'
say ' It took 't' hours to change the 'tX' tire.'
hl = hl + t + 1
hr = hr + t + 1
end
call delay 750
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to show title, request for game parameters and initial
work variables
=================================================================
*/
initial_environment:
call check_operating_system
call showtitl
cx = 0
hl = 3
hr = 0
hs = 7
mf = 0
np = 1
ns = 0
nt = 0
sl = 55
tc = 10
ts = 1
wf = 190
xc = 190
ntX.1 = 'first'
ntX.2 = 'second'
ntX.3 = 'third'
ntX.4 = 'fourth'
dsX.0 = 'Monday'
dsX.1 = 'Tuesday'
dsX.2 = 'Wednesday'
dsX.3 = 'Thursday'
dsX.4 = 'Friday'
dsX.5 = 'Saturday'
dsX.6 = 'Sunday'
sh_keep_on_trucking = 1 /* switch, 0 = end of loop */
call delay 100
interpret rxext
call getstr
interpret rxcls
call report_trip_duration hr
say 'You are at the Los Angeles trucking terminal.'
say 'Three types of cargo are available:'
say ' '
say " 1--Oranges (highest profit if they don't spoil)"
say ' 2--Freight forwarding (penalty for late delivery)'
say ' 3--U.S. Mail (lowest rate, but no hurry to arrive)'
say ' '
say 'The cargo is due in New York by 4 PM on Thursday.'
say ' '
say 'Which type of cargo do you want (1, 2 or 3)?'
do forever
ct = getstr()
if length(ct) = 1 & pos(ct, '123') > 0 then
leave
end
wl = 0
do while wl < 25000
say 'How many pounds will you carry (40,000 is the legal limit)?'
wl = getnum()
if wl < 25000 then
say "You can't make a living on half a load."
end
say ' '
say ' They are loading your truck now.'
call delay (wl % 100)
if wl > 50000 then do
wl = 50000
say ' 50,000 pounds of cargo has filled your trailer!'
call delay 250
end
interpret rxcls
hr = hr + 1
call report_trip_duration hr
say 'You paid $190.00 for a nearly full tank of diesel fuel.'
say ' '
say 'Two of your tires are worn. Do you want replacements (Y or N)?'
do forever
ikeyX = getstr()
if length(ikeyX) = 1 & pos(ikeyX, 'NY') > 0 then
leave
end
if ikeyX = 'Y' then do
say 'A new tire costs $200.00. A retread costs $100.00.'
say ' Which type do you want (N=new or R=retread)?'
do forever
zX = getstr()
if length(zX) = 1 & pos(zX, 'NR') > 0 then
leave
end
say ' How many (0-3)?'
do forever
tno = getstr()
if length(tno) = 1 & pos(tno, '0123') > 0 then
leave
end
if tno > 0 then do
ts = ts + tno - 2
if zX = 'R' then do
tc = tc - 1.5 * tno
xc = xc + 100 * tno
end
else do
tc = tc - 2 * tno
xc = xc + 200 * tno
end
end
end
say ' '
say 'You may choose the N(orthern), M(iddle) or S(outhern) route.'
say ' Which route do you choose (N, M or S)?'
do forever
ikeyX = getstr()
if length(ikeyX) = 1 & pos(ikeyX, 'MNS') > 0 then
leave
end
say ' '
if ikeyX = 'N' then do
rt = 1
rh = 4
mt.1 = 2710
mp.1.1 = 90; mpX.1.1 = 'Barstow';
mrX.1.1 = 'I-15 in California'; zm.1.1 = 7.80
mp.1.2 = 245; mpX.1.2 = 'Las Vegas';
mrX.1.2 = 'I-15 in California'; zm.1.2 = 1.00
mp.1.3 = 365; mpX.1.3 = 'Utah border';
mrX.1.3 = 'I-15 in Arizona'; zm.1.3 = 0.00
mp.1.4 = 500; mpX.1.4 = 'End of Interstate';
mrX.1.4 = 'I-15 in Utah'; zm.1.4 = 3.20
mp.1.5 = 555; mpX.1.5 = 'Salina';
mrX.1.5 = 'US-89 in Utah'; zm.1.5 = 4.50
mp.1.6 = 760; mpX.1.6 = 'Grand Junction';
mrX.1.6 = 'I-70 in Utah'; zm.1.6 = 5.40
mp.1.7 = 1010; mpX.1.7 = 'Denver';
mrX.1.7 = 'I-70 in Colorado'; zm.1.7 = 3.75
mp.1.8 = 1190; mpX.1.8 = 'Nebraska border';
mrX.1.8 = 'I-76 in Colorado'; zm.1.8 = 1.00
mp.1.9 = 1450; mpX.1.9 = 'Omaha';
mrX.1.9 = 'I-80 in Nebraska'; zm.1.9 = 5.50
mp.1.10 = 1590; mpX.1.10 = 'Demoines';
mrX.1.10 = 'I-80 in Iowa'; zm.1.10 = 4.75
mp.1.11 = 1750; mpX.1.11 = 'Illinois border';
mrX.1.11 = 'I-80 in Iowa'; zm.1.11 = 5.60
mp.1.12 = 1910; mpX.1.12 = 'Gary';
mrX.1.12 = 'I-80 in Illinois'; zm.1.12 = 2.50
mp.1.13 = 2050; mpX.1.13 = 'Ohio border';
mrX.1.13 = 'Indianna Turnpike'; zm.1.13 = 2.45
mp.1.14 = 2215; mpX.1.14 = 'Cleveland';
mrX.1.14 = 'Ohio Turnpike'; zm.1.14 = 2.80
mp.1.15 = 2280; mpX.1.15 = 'Pennsylvania border';
mrX.1.15 = 'I-80 in Ohio'; zm.1.15 = 4.16
mp.1.16 = 2615; mpX.1.16 = 'East Stroudsberg';
mrX.1.16 = 'I-80 in Pennsylvania'; zm.1.16 = 3.33
mp.1.17 = 2675; mpX.1.17 = 'Washington Bridge';
mrX.1.17 = 'I-80 in New Jersey'; zm.1.17 = 2.20
mp.1.18 = 9999; mpX.1.18 = 'New York';
mrX.1.18 = 'city streets'; zm.1.18 = 8.00
end
else if ikeyX = 'M' then do
rt = 0
rh = 2
mt.0 = 2850
mp.0.1 = 90; mpX.0.1 = 'Barstow';
mrX.0.1 = 'I-15 in California'; zm.0.1 = 7.80
mp.0.2 = 225; mpX.0.2 = 'Needles';
mrX.0.2 = 'I-40 in California'; zm.0.2 = 1.00
mp.0.3 = 440; mpX.0.3 = 'Flagstaff';
mrX.0.3 = 'I-40 in California'; zm.0.3 = 3.65
mp.0.4 = 620; mpX.0.4 = 'Gallup';
mrX.0.4 = 'I-40 in Arizona'; zm.0.4 = 5.50
mp.0.5 = 760; mpX.0.5 = 'Albuquerque';
mrX.0.5 = 'I-40 in New Mexico'; zm.0.5 = 3.35
mp.0.6 = 930; mpX.0.6 = 'Tucumcari';
mrX.0.6 = 'I-40 in New Mexico'; zm.0.6 = 1.00
mp.0.7 = 1040; mpX.0.7 = 'Amarillo';
mrX.0.7 = 'I-40 in Texas'; zm.0.7 = 7.80
mp.0.8 = 1155; mpX.0.8 = 'Oklahoma border';
mrX.0.8 = 'I-40 in Texas'; zm.0.8 = 5.50
mp.0.9 = 1305; mpX.0.9 = 'Oklahoma City';
mrX.0.9 = 'I-40 in Oklahoma'; zm.0.9 = 2.65
mp.0.10 = 1530; mpX.0.10 = 'Missouri border';
mrX.0.10 = 'Oklahoma Turnpike'; zm.0.10 = 2.40
mp.0.11 = 1815; mpX.0.11 = 'St. Louis';
mrX.0.11 = 'I-44 in Missouri'; zm.0.11 = 0.00
mp.0.12 = 1980; mpX.0.12 = 'Terre Haute';
mrX.0.12 = 'I-70 in Illinois'; zm.0.12 = 5.50
mp.0.13 = 2050; mpX.0.13 = 'Indianapolis';
mrX.0.13 = 'I-70 in Indianna'; zm.0.13 = 0.00
mp.0.14 = 2115; mpX.0.14 = 'Ohio border';
mrX.0.14 = 'I-70 in Indianna'; zm.0.14 = 1.00
mp.0.15 = 2220; mpX.0.15 = 'Columbus';
mrX.0.15 = 'I-70 in Ohio'; zm.0.15 = 4.25
mp.0.16 = 2350; mpX.0.16 = 'Wheeling West Virginia';
mrX.0.16 = 'I-70 in Ohio'; zm.0.16 = 4.25
mp.0.17 = 2410; mpX.0.17 = 'New Stanton';
mrX.0.17 = 'I-70 in Pennsylvania'; zm.0.17 = 6.75
mp.0.18 = 2570; mpX.0.18 = 'Harrisburg';
mrX.0.18 = 'Pennsylvania Turnpike'; zm.0.18 = 3.75
mp.0.19 = 2760; mpX.0.19 = 'New Jersey border';
mrX.0.19 = 'Pennsylvania Turnpike'; zm.0.19 = 2.95
mp.0.20 = 2840; mpX.0.20 = 'Holland Tunnel';
mrX.0.20 = 'I-70 in New Jersey'; zm.0.20 = 2.40
mp.0.21 = 9999; mpX.0.21 = 'New York';
mrX.0.21 = 'New York streets'; zm.0.21 = 8.00
end
else do
rt = 2
rh = 1
mt.2 = 3120
mp.2.1 = 75; mpX.2.1 = 'Palm Springs';
mrX.2.1 = 'I-10 in California'; zm.2.1 = 0.00
mp.2.2 = 225; mpX.2.2 = 'Blythe';
mrX.2.2 = 'I-10 in California'; zm.2.2 = 1.00
mp.2.3 = 375; mpX.2.3 = 'Phoenix';
mrX.2.3 = 'I-10 in Arizona'; zm.2.3 = 0.00
mp.2.4 = 495; mpX.2.4 = 'Tucson';
mrX.2.4 = 'I-10 in Arizona'; zm.2.4 = 7.90
mp.2.5 = 650; mpX.2.5 = 'Lordsburg';
mrX.2.5 = 'I-10 in Arizona'; zm.2.5 = 5.75
mp.2.6 = 795; mpX.2.6 = 'El Paso';
mrX.2.6 = 'I-10 in New Mexico'; zm.2.6 = 0.00
mp.2.7 = 965; mpX.2.7 = 'Pecos';
mrX.2.7 = 'I-10 in Texas'; zm.2.7 = 1.00
mp.2.8 = 1080; mpX.2.8 = 'Odessa';
mrX.2.8 = 'I-20 in Texas'; zm.2.8 = 0.00
mp.2.9 = 1250; mpX.2.9 = 'Abilene';
mrX.2.9 = 'I-20 in Texas'; zm.2.9 = 3.80
mp.2.10 = 1439; mpX.2.10 = 'Dallas';
mrX.2.10 = 'I-20 in Texas'; zm.2.10 = 0.00
mp.2.11 = 1610; mpX.2.11 = 'Louisiana border';
mrX.2.11 = 'I-20 in Texas'; zm.2.11 = 5.00
mp.2.12 = 1785; mpX.2.12 = 'Vicksburg';
mrX.2.12 = 'I-20 in Louisiana'; zm.2.12 = 0.00
mp.2.13 = 1965; mpX.2.13 = 'Alabama border';
mrX.2.13 = 'I-20 in Mississippi'; zm.2.13 = 1.00
mp.2.14 = 2100; mpX.2.14 = 'Birmingham';
mrX.2.14 = 'I-20 in Alabama'; zm.2.14 = 4.25
mp.2.15 = 2200; mpX.2.15 = 'Georgia border';
mrX.2.15 = 'I-20 in Alabama'; zm.2.15 = 0.00
mp.2.16 = 2255; mpX.2.16 = 'Atlanta';
mrX.2.16 = 'I-20 in Georgia'; zm.2.16 = 0.00
mp.2.17 = 2320; mpX.2.17 = 'Carolina border';
mrX.2.17 = 'I-85 in Georgia'; zm.2.17 = 5.75
mp.2.18 = 2565; mpX.2.18 = 'Greensboro';
mrX.2.18 = 'I-85 in Carolina'; zm.2.18 = 3.80
mp.2.19 = 2680; mpX.2.19 = 'Virginia border';
mrX.2.19 = 'I-85 in North Carolina';zm.2.19 = 7.85
mp.2.20 = 2775; mpX.2.20 = 'Richmond';
mrX.2.20 = 'I-85 in Virginia'; zm.2.20 = 0.00
mp.2.21 = 2880; mpX.2.21 = 'Washington D.C.';
mrX.2.21 = 'I-95 in Virginia'; zm.2.21 = 0.00
mp.2.22 = 2920; mpX.2.22 = 'Baltimore';
mrX.2.22 = 'I-95 in Maryland'; zm.2.22 = 2.30
mp.2.23 = 2990; mpX.2.23 = 'New Jersey border';
mrX.2.23 = 'I-95 in Delaware'; zm.2.23 = 2.25
mp.2.24 = 3110; mpX.2.24 = 'Holland Tunnel';
mrX.2.24 = 'New Jersey Turnpike'; zm.2.24 = 2.40
mp.2.25 = 9999; mpX.2.25 = 'New York';
mrX.2.25 = 'city streets'; zm.2.25 = 8.00
end
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to warn and handle trucker's chance to stop & rest
=============================================================
*/
pass_stop_opportunity:
say 'Truck stop ahead. Do you want to stop (Y or N)? '
shsleep_sw = 0 /* switch, 1 = has rested/slept */
do forever
do forever
ikeyX = getstr()
if length(ikeyX) = 1 & pos(ikeyX, 'NY') > 0 then
leave
end
if ikeyX = 'N' then do
hl = hl + 1
leave
end
t = 85 + 35 * rnd() % 1
say 'Diesel fuel costs $'t/100' per gallon.'
say ' How many gallons do you want?'
t1 = getnum()
if t1 > 0 then do
say 'Pay $'t * t1 / 100
xc = xc + t * t1 / 100
wf = wf + t1
end
say 'So far, you have spent $'xc
if wf > 200 then do
say 'Your tank only holds 200 gallons ...'
say formatsim(wf - 200, 4) 'gallons spilled !!'
wf = 200
end
if ts <= 0 then do
t = 200 + 50 * rnd() % 1
t1 = 100 + 70 * rnd() % 1
say 'A new tire costs $'t' A retread costs $'t1
say ' Do you want to buy a tire (Y or N)?'
do forever
ikeyX = getstr()
if length(ikeyX) = 1 & pos(ikeyX, 'NY') > 0 then
leave
end
if ikeyX = 'Y' then do
say ' Which type do you want (N=new or R=retread)?'
do forever
zX = getstr()
if length(zX) = 1 & pos(zX, 'NR') > 0 then
leave
end
say ' How many (0-3)?'
do forever
tno = getstr()
if length(tno) = 1 & pos(tno, '0123') > 0 then
leave
end
if tno > 0 then do
ts = tno - 1
if zX = 'R' then do
tc = tc - 0.5 * tno
xc = xc + t1 * tno
end
else do
tc = tc - tno
xc = xc + t * tno
end
end
end
end
if shsleep_sw then do
say ' '
leave
end
hr = hr + 1
ns = 0
say 'Do you want to get some sleep (Y or N)?'
do forever
ikeyX = getstr()
if length(ikeyX) = 1 & pos(ikeyX, 'NY') > 0 then
leave
end
if ikeyX = 'N' then do
say ' '
call report_trip_duration hr
leave
end
say ' How many hours of rest?'
t = getnum()
if t < 1 then
leave
shsleep_sw = 1
dh = hr + 7 - 24 * ((hr + 7) % 24)
hr = hr + t
call delay 50 * t
if ct = 1 then do
wf = wf - 7 * t
if wf < 0 then do
wf = 0
call wait_while_load_spoiled
end
end
if dh > 3 &,
dh < 20 then do
t = (t / 2 + 0.6) % 1
say "Thanks to your neighbors' noise, you got only "t,
"hours real sleep."
call delay 200
end
hs = hs + t
if t > 3 then
hl = 0
else
hl = hl / 2
shf = 5000
shd = 100
do 3
interpret rxbeep
call delay 50
end
shd = 350
interpret rxbeep
interpret rxcls
call report_trip_duration hr
say 'Time to hit the road again.'
say ' '
call check_trucker_condition
say 'You now have 'wf % 1' gallons of fuel.'
say 'Do you want to buy more (Y or N)?'
end
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to calculate & report trip duration in days and hours
================================================================
*/
report_trip_duration: procedure expose dsX. dh
arg hr
dh = hr + 8
shdt = dh % 24
dh = dh - 24 * shdt
do while shdt > 6
shdt = shdt - 7
end
dmX = 'AM'
if dh = 12 then
dmX = 'Noon'
else do
if dh > 12 then do
dh = dh - 12
dmX = 'PM'
end
if dh = 0 then do
dh = 12
dmX = 'Midnight'
end
end
say ' '
say 'Day: 'dsX.shdt
say 'Time: 'formatsim(dh, 2)' 'dmX
say ' '
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine which drives the game cycles
=======================================
*/
ride_cross_country:
do while mp.rt.np <= mf
call check_obstacles
if sh_keep_on_trucking then
nop
else
return
end
say 'Cruising on 'mrX.rt.np
call check_trucker_condition
say 'You are feeling 'cdX
call check_weather
say 'Current weather: 'crX
ns = ns + 1
if ns > 3 then
call pass_stop_opportunity
sp = 0
maxsp = (1.5 * sl) % 1
do while sp < 20 |,
sp > maxsp
say 'How fast do you wish to go (20-100)?'
sp = getnum()
sp = (sp + 0.5) % 1 /* Round it up */
if sp < 20 then
say 'Your have to go at least 20 --'
if sp > maxsp then
say 'You can only get the old rig to go 'maxsp'MPH on this road.'
end
af = sp ** 2 * cd * cr
if af > rnd() * 10000000 then do
do shf = 1000 to 10 by -50
shd = shf % 10
interpret rxbeep
interpret rxcls
say ' '
say 'C R A S H !!'
end
say ' '
if cd = 100 |,
(cd = 25 & sp < 65) then
say 'You fell asleep at the wheel.'
else if cr = 50 then
say 'You drove off the road into a snow filled ditch.'
else if cr = 10 then
say 'You rear-ended a pick-up with no tail lights.'
else if sp > 65 then
say ' Speed kills !'
else if cd > 2 then do
say 'You hit a slick spot... !@#$%^...'
call delay 500
say ' ... and !@#$%^... skidded off the road.'
end
else
say 'A drunk driver rammed your rig. !@#$%^... Tough luck !'
say ' '
call delay 350
say 'You lose your truck & profits.'
sh_keep_on_trucking = 0
return
end
tc = tc + 0.00005 * sp * wl / 40000
af = sqr(mf + 100) * tc
if af > rh * 25000 * rnd() then
call got_flat_tire
if sp > sl - rh + 10 then do
if (sp - sl + 2 * rh - 5) ** 2 >= 900 * rnd() then do
call got_caught_by_police
if sh_keep_on_trucking then
nop
else
return
end
end
hl = hl + 1
hr = hr + 1
if sl < 40 then
sl = 55
t = abs(55 - sp)
if t > 12 then
t = 12.5
t1 = sp / (4.5 - 0.2 * t)
wf = wf - t1
if wf < 0 then
call run_out_of_gas
mf = mf + sp
if mf >= mt.rt then
call end_of_trip
if sh_keep_on_trucking then do
call delay 25
interpret rxcls
call report_trip_duration hr
say 'Approximate fuel:' ((wf - 4 + rnd() * 10) % 1)
say 'Speed: 'sp
say 'Odometer: 'mf
say 'Miles to go: 'mt.rt - mf
say ' '
end
return
/* ------------------------------<End>------------------------------ */
/*
Function to generate and return a random number
between/with 0.0000 & 1.0000
=============================================
*/
rnd: procedure
seed = time('E')
seed = time('S') + (seed - seed % 1) * 1000000
return random(0, 10000, seed) / 10000
/* ------------------------------<End>------------------------------ */
/*
Subroutine to handle one of the annoying problems the trucker could
easily have avoided..., NO FUEL
===================================================================
*/
run_out_of_gas:
t1 = t1 + wf
wf = 0
sp = 0
t = (4.5 - 0.2 * t) * t1
mf = mf + (t % 1)
say 'After' formatsim(t, 4),
'more miles, you ran out of fuel (DUMMY !!)'
call wait_for_gas
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to show the game title
=================================
*/
showtitl: procedure
sh.1 =,
'TTTTTTTTT RRRRRRR UUU UUU CCCCCC KKK KKK EEEEEEEEE RRRRRRR'
sh.2 =,
' TTT RRR RRR UUU UUU CCC CCC KKK KKK EEE RRR RRR'
sh.3 =,
' TTT RRR RRR UUU UUU CCC KKK KKK EEE RRR RRR'
sh.4 =,
' TTT RRR RRR UUU UUU CCC KKKKKK EEE RRR RRR'
sh.5 =,
' TTT RRRRRRR UUU UUU CCC KKKKK EEEEE RRRRRRR'
sh.6 =,
' TTT RRRRRR UUU UUU CCC KKKKKK EEE RRRRRR'
sh.7 =,
' TTT RRR RRR UUU UUU CCC KKK KKK EEE RRR RRR'
sh.8 =,
' TTT RRR RRR UUU UUU CCC CCC KKK KKK EEE RRR RRR'
sh.9 =,
' TTT RRR RRR UUUUUUU CCCCCC KKK KKK EEEEEEEEE RRR RRR'
say ' '
do shi = 1 to 9
say ' 'sh.shi
say ' 'sh.shi
end
say ' '
drop sh.
return
/* ------------------------------<End>------------------------------ */
/*
Function to return the SQUARE ROOT of the argument X.
=====================================================
According to Newton-Raphson algorithm
*/
sqr: procedure
arg x
arg = abs(x)
root = arg / 2
if root > 0 then do digits()
root = (root + arg / root) / 2
if abs(root ** 2 - arg) / arg - 0.000001 <= 0 then
leave
end
return root
/* ------------------------------<End>------------------------------ */
/*
Subroutine to show a 'moving truck' under OS/2 2.x PL/2 REXX
============================================================
*/
truckos2: procedure
sht1 = ' TRUCKER_OO=.'
sht2 = " -()-----()='"
shtx = center('Press Enter to start the game...', 79)
call syscurstate 'OFF' /* temporarily hide the cursor */
do i = 2 to 79
if i > 67 & i < 79 then do
shil = 79 - i
sht1 = left(sht1, shil)
sht2 = left(sht2, shil)
end
call syscurpos 19, i
say sht1
call syscurpos 20, i
say sht2
call syscurpos 20, 2
say left(shtx, i)
end
call syscurstate 'ON'
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to show a 'moving truck' under Quercus Personal/REXX
===============================================================
*/
truckper: procedure
sht1 = ' TRUCKER_OO=.'
sht2 = " -()-----()='"
shtx = center('Press Enter to start the game...', 79)
do i = 2 to 79
if i > 67 & i < 79 then do
shil = 79 - i
sht1 = left(sht1, shil)
sht2 = left(sht2, shil)
end
call cursor 20, i
say sht1
call cursor 21, i
say sht2
call cursor 21, 2
say left(shtx, i)
end
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to show a 'moving truck' under Kilowatt Software
Portable/REXX
===========================================================
*/
truckpor: procedure
sht1 = ' TRUCKER_OO=.'
sht2 = " -()-----()='"
shtx = center('Press Enter to start the game...', 79)
do i = 2 to 79
if i > 67 & i < 79 then do
shil = 79 - i
sht1 = left(sht1, shil)
sht2 = left(sht2, shil)
end
call cursor 20, i
say sht1
call cursor 21, i
say sht2
call cursor 21, 2
if i < 78 then /* to avoid a line overflow, bug(?) in ver.1.10 - */
say left(shtx, i)
end
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to handle delivery of gas
====================================
*/
wait_for_gas:
say ' It cost $200 to get a barrel of diesel delivered.'
wf = 55
t1 = 1 + (rnd() * 5) % 1
xc = xc + 200
hl = hl + t1
hr = hr + t1
say ' You also wasted 't1' hours by your carelessness.'
call wait_while_load_spoiled
return
/* ------------------------------<End>------------------------------ */
/*
Subroutine to determine the condition of the oranges (load type 1)
while the trucker is not riding due to obstacles
==================================================================
*/
wait_while_load_spoiled: procedure expose ct cx
if ct = 1 then do
cx = cx + (rnd() * 3) % 1
say ' Sitting with the refer unit off is damaging the oranges.'
end
call delay 1000
return
/* ------------------------------<End>------------------------------ */
/* --------------------------------------------------------------------
NOTES:
======
Descriptions of important variables in 'TRUCKER'
------------------------------------------------
af = all (reusable) failure code
cd = code of condition/mood of the trucker (1:good, ..., 100:worst)
cdX = condition/mood of the trucker
cr = condition of the weather code (1:good, ..., 50:worst)
crX = condition of the weather
ct = cargo type (1, 2 or 3)
cx = condition of the load (okay if smaller than 1)
dh = day hour (time in day)
dsX = day script (day in word)
hl = hours labored (hours continuously worked)
hr = hours ridden (total elapse time away from LA)
hs = hours slept (total)
hsw1 = help switch
ikeyX = input character string
intzh = integer(zh)
maxsp = maximum speed the truck can handle
mf = miles covered
mp = milestone place number (where the truck is)
mpX = milestone place name (city/town at mp)
mrX = milestone road name (highway/street name at mp)
mt = mile total between LA and NY for the chosen route
np = number of place (milestone number)
ns = number of stations passed after last stop
nt = number of traffic violations
ntX = number of traffic violations in word
rh = road quality (1 = better, 4 = worst)
rt = route (1 = North, 0 = Middle, 2 = South)
rx.. = variables with REXX system specific commands to be interpreted
sh.. = Simon Husin's work, temporary and reusable variables
sl = speed limit imposed
sp = speed
t.. = temporary and reusable variables
tc = tire condition (0 = best, 10 = okay, etc.)
tno = number of tires purchased
ts = tire spared
wf = work fuel (estimate volume of fuel available in tank)
wl = work load (total pounds of load)
xc = trip expenses
xt = trip final financial result
zh = same as zm
zm = standard hindrance factor at milestone mp
zx = tire type (N=new or R=retread)
Compatibility Issues:
---------------------
1. This program is using IF THEN NOP ELSE ... and (x < y | x > y)
constructions rather than \ or \= to make it run under ARexx which is
using tilde (~) as the NOT sign.
Solutions applied to complement ARexx shortcomings:
- FORMATSIM(...) instead of FORMAT(...)
- LENGTH(...) = 1 & POS(...) instead of WORDPOS(...)
- A 80-character title has been replaced with two short title lines
to avoid the line to wrap around on the output window
Solutions applied to complement REXX/Windows shortcomings:
- Parse Source has been moved to the main program to avoid problems
with REXX/Windows running with the Intel 386(-compatible) processor
Solutions applied to complement ARexx and uni-REXX shortcomings:
- Exponential notation (e.g. 1E4, 1E-6, etc.) has been replaced with
conventional notation (e.g. 10000, 0.000001, etc.)
2. IBM Mainframe users:
This program will run without any changes in your environment. You
might want to check first whether the character '|' gets converted
correctly (to a whole vertical bar) or to a broken vertical bar. In
the latter case, replace all broken bars with whole ones, then... hit
the road!
Just in case you don't know:
The MVS/TSO or VM/CMS implementation of REXX supports the millionth
of a second (1E-6) in the E and L options of the TIME function.
3. PC users:
a) Personal REXX:
This program has been tested with Quercus Systems Personal REXX under
DOS, Windows and OS/2 (16-bit and 32-bit) without any problems.
In DOS environment:
- first create the object code with /O/NM option
- due to the QUEUE instruction, needed to accomodate REXX/Windows'
shortcomings, you must first run RXINTMGR and STACKMGR before
executing this program
DELAY(n) and REXXLIB functions COS(n) and SQRT(n) are not used to
simplify this program's portability.
b) Portable/REXX:
Built-in functions COS(n), DELAY(n) and SQRT(n) are not used to
simplify this program's portability.
Although the components, tested separately do work, this entire
program has been tested with Portable/REXX Versions 1.10 and 1.30
without any success (system resources exhausted).
c) REXX/Windows:
This program will run without any changes in REXX/Windows.
The shortcomings in the interpreter mentioned in point number 1 were
detected only on 386-based computers caused by the PARSE SOURCE on
line 189 which resides within a subroutine. The interpreter has
since been fixed.
d) Tritus SPF
Tritus allows only 32000-byte or smaller REXX programs to be run via
its REXX primary command. Yet, experiments with stripped down
TRUCKER in REXX did not produce satisfying results.
Under DOS (TSPF):
The program has been tested with TSPF 1.2 Demo, REXX version 1.66
dated 18 Feb 1992 without any success (system resources exhausted).
Under OS/2 (TSPF2):
Tritus is using IBM's PL 2/REXX under OS/2. All experiments
caused the task to hang and could be only released during system
reset or boot up.
e) OS/2 Procedures Language/2 REXX:
Built-in function SysSleep(n), and functions SQRT(n) and COS(n)
supported by RXMATHFN library are not used to simplify this program's
portability.
OS/2 2.x REXX Utility 'SYSCLS' is not used despite the fact that it
is a bit faster and 'cleaner' than the OS/2 command clear screen
(CLS) because the latter maintains the screen colors better than the
first.
Although PULL is supported by OS/2, earlier versions (before 2.0)
have one difference with the same command in other interpreters,
i.e. it shows a blank line with '?' followed by the actual prompt
on the next line.
4. Unix/AIX users:
This program will run without any changes in uni-REXX.
The shortcomings in the interpreter mentioned in point number 1 were
detected by The Workstation Group. The interpreter has since been
fixed.
5. The use of interpret command slows down the execution of the
program, yet it is used to ensure and ease compatibility accross
platforms.
6. TRUCKxxx subroutines have been created for those (xxx) interpreters
which support cursor positioning on the screen. This approach was
chosen, instead of the INTERPRET instruction executing the cursor
positioning function, to achieve the maximum speed of the 'animation'
of the 'truck' on the screen.
The same can be created for the mainframe computers equipped with a
Dialog Manager (ISPF/VM), by creating a panel member.
6. LINEIN(CON) is a function that is supported only by OS/2, Personal
REXX and Portable/REXX interpreters.
It is comparable with the PARSE PULL command in that the entered
alphabetical characters are NOT translated into uppercase.
Known REXX Interpreters/Compiler/Extensions:
--------------------------------------------
CDB Software, Inc. (1-800-627-6561):
o CDB/REXX, The DB2 and REXX Integrator
Failure Analysis Associates, Inc. (1-800-322-2136):
o FaAA_LSIE/VM Library of System Interpreter Extensions for REXX/VM
among others, to access tape and VSAM files
Goal Systems International, Inc. (1-614-888-1775):
o OPS/MVS 2.2 with Goal REXX interpreter/compiler
IBM Corporation (1-800-IBM-CALL):
o Compiler and Library for REXX/370 for both CMS and MVS/ESA
o MVS - TSO/E REXX
o Procedures Language REXX/2 for OS/2 w/ easy (SQL) access to the
OS/2 ES Database Manager (DBM, DB2/2) (1-800-3IBM-OS2 buy OS/2)
o REXXEA, OS/2 Extended Attribute functions
(REXXEA.ZIP-IBM NSC BBS)
o RXMATHFN, Math functions (RXMATH.ZIP - IBM NSC BBS)
o VM/CMS REXX/370 VM
o VREXX, Visual REXX Extension (VREXX2.ZIP - IBM NSC BBS)
Kilowatt Software (1-800-848-9474 or 1-614-866-4300):
o Portable/REXX for DOS version 1.10i
o REXX/Windows for DOS/MS-Windows 3.x
o REXX4NT for MS-Windows NT (literature: available in March 1993)
Open Software Technologies, Inc. (1-407-834-2822):
o REXX/NET & REXX/TSO for DB2 Application Development
o REXXTOOLS/MVS Compiler (w/ VSAM files access)
Quercus Systems (1-408-867-REXX):
o Personal REXX for DOS version 3.0
o Personal REXX for MS-Windows 3.x version 3.0
o Personal REXX for OS/2 version 2.0 (16-bit)
o Personal REXX for OS/2 version 3.0 (32-bit)
The fastest REXX interpreter for OS/2 (per February of 1993)
o REXXLIB - OS/2 REXX Extensions with useful and powerful functions
and commands
Relational Architects International, Inc.
(1-800-776-0771 or 1-201-420-0400)
o AcceleREXX - REXX compiler, an alternative to the IBM's REXX/370
o RLX/Compile - Static SQL support for RLX/REXX
o RLX/ISPF - Allows SQL queried tables scrolled in ISPF tables
o RLX/MVS - An address space independent implementation of RLX/REXX
o RLX/NET - REXX SQL for NetView
o RLX/REXX - SQL-embedded REXX to access DB2 database
(RLX = Relational Language Executive)
Ruddock and Associates, Inc. (1-416-340-0887)
o REXXTACY 2.0 (OS/2, DOS, MS C 6 & 7 compatible - Beta Rev. 1.6)
REXX to C program source code converter
Sidney (1-214-750-8112):
o PACKIO (packed file manipulation routine)
o PDSIO (various PDS file/members access routines)
o Rexx Function Library (sort, field-packing, etc.)
o Rexx-Protect (program scrambler/compressor)
o Rexx-Protect MVS
o VSAMIO (for VSAM file access)
The Workstation Group - wrk/grp (1-800-228-0255 or 1-708-696-4800):
o uni-REXX for Sun SPARCstation, Sun-3, Sun-4, Sun-386i, HP9000,
Apollo, IBM RS/6000, RT/PC, AIX/370, Amdahl UTS, Cray,
DECstation, Silicon Graphics, NeXt, SCO/Unix, etc.
Tritus, Inc. (1-800-321-2100 or 1-512-794-5800):
o Tritus SPF for DOS (TSPF) includes a subset of REXX interpreter
called REXX/PC
William S. Hawes (1-617-568-8695):
o ARexx (pronounce: AY-REX) - REXX implementation for the
Commodore's Amiga computers
Included with the Operating System version 2.0 and later
Known Packages which include REXX macros and/or interface with REXX:
--------------------------------------------------------------------
ASDG, Inc. (1-608-273-6585):
o Art Department Professional (ADPro) - A graphics software (Amiga)
Borland International, Inc. (1-800-331-0877 or 1-800-461-3327 ->Canada)
o Object Vision 2.0 for OS/2 - Easy-to-use application development
tool
Command Technology Corporation (1-800-336-3320 or 1-415-521-5900):
o SPF/2 for OS/2 - ISPF for the PCs
Commodore - Amiga, Inc.
o AmigaVision - Program builder using GUI (Amiga)
Geodesic Publications (1-404-822-0566):
o IllumiLink - Remote control device controler (Amiga)
Gold Disk, Inc. (1-416-602-4000):
o Home Office Advantage - Spreadsheet 'calculator' (Amiga)
o HyperBook - Hypermedia organizer (Amiga)
o ShowMaker - Presentation manager (Amiga)
Gramma Software (1-206-363-6417):
o FreD Speed-Dialer - A telephone number database manager (Amiga)
IBM Corporation (1-800-IBM-CALL):
o IBM SAA AD/Cycle Prolog for OS/2
o ISPF Dialog Manager - Full & Windowed screen manipulation tool
for 3270- & 3290-compatible display terminals under MVS/TSO
o ISPF/PDF Edit - TSO Full-screen text editor
o MVS Database2 (DB2) Query Management Facility (QMF)
o OS/2 EE, ES Communication Manager (CM)
o OS/2 EE, ES Database Manager (DBM)
o OS/2 EE, ES Query Manager (QM)
o VM Dialog Manager - Full & Windowed screen manipulation tool
for 3270- & 3290-compatible display terminals under VM/CMS
o XEdit - VM/CMS Full-screen text editor
Inovatronics, Inc. (1-214-340-4991):
o CanDo - Amiga applications generator
o C.A.P.E. - Assembler programming environment (Amiga)
Mansfield Software Group, Inc. (1-203-429-8402):
o KEdit for DOS and OS/2 - XEdit for the PCs
New Horizons Software, Inc. (1-512-328-6650):
o ProWrite - Wordprocessor (Amiga)
NewTek, Inc. (1-800-843-8934):
o Digi-Paint 3 - An image processing package (Amiga)
Oxxi (1-213-427-1227):
o A-Talk III - A telecommunication software (Amiga)
Precision Software (1-800-562-9909):
o SuperBase Professional 4 - A RDBMS for Amiga computers
o SuperPlan - Spreadsheet 'calculator' (Amiga)
Progressive Peripherals and Software (1-303-825-4144):
o Baud Bandit - A telecommunication software (Amiga)
o IntroCAD Plus - A drawing package (Amiga)
Quercus Systems (1-408-867-REXX):
o REXXTERM for DOS and OS/2 - A ProComm-like telecommunication
package
Softwood, Inc. (1-602-431-9151):
o Electric Thesaurus (Amiga)
Teregrine Systems (1-619-431-2400):
o HyperStation - Data-entry emulator for mainframe on-line
(e.g. CICS) program testings
The Workstation Group - wrk/grp (1-800-228-0255 or 1-708-696-4800):
o uni-SPF - ISPF for Unix/AIX-based computers
o uni-XEdit - XEdit for Unix/AIX-based computers
Tritus, Inc. (1-800-321-2100 or 1-512-794-5800):
o Tritus SPF for DOS and OS/2 - ISPF for the PCs
ISPF Dialog Manager-compatibility features will be included in
the late 1993 release
Periodical, new, and/or additional REXX information can be found in:
--------------------------------------------------------------------
Enterprise Systems Journal: 1-214-343-3717
IBM BBS (Canada) 1-416-946-4255 (Toronto)
1-514-938-3022 (Montreal)
1-604-664-6466 (Vancouver)
IBM NSC BBS: 1-404-835-6600
IBM OS/2 Developer: IBM OS/2 Developer
P.O. Box 1079
Skokie, IL 60076-8079
1-800-WANT-OS2 (or 1-708-647-5960)
The OS/2 User Group (outside the U.S.)
Barton House
Cirencester, Gloucestershire
GL7 2EE, U.K.
1-0285-641-175
IBM Personal Systems Technical Solutions (Form number GBOF-1229):
IBM Corporation
Internal ZIP 40-A2-04
One East Kirkwoord Blvd.
Roanoke, TX 76299-0015
IBM REXX-related materials: 1-800-IBM-CALL
1-800-465-1234 (Canada)
International OS/2 Users Group (Europe)
44-0454-633-197
44-0454-633-420
OS/2 Monthly: 1-800-365-2642
Quercus Systems BBS: 1-408-867-7488
Thanks:
-------
I would like to thank the following people for helping me create this
program:
- Mr. Cooper, Kerry (Nybbles & Bytes, Tacoma, WA - Amiga Dealer)
- Mr. Daney, Charles (Quercus Systems)
- Mr. Glantzberg, Hughes (Himself)
- Mr. Kenney, Barry (Blue Cross of Washington and Alaska)
- Mr. Slayton, Bill (Blue Cross of Washington and Alaska)
- Mr. Spire, Ed (The Workstation Group)
- Ms. Taylor, Pam (The Workstation Group)
- Mr. Watts, Keith (Kilowatt Software)
About Simon Rudy Selamat HUSIN (also known as Ho Wie Lok or "Oky"):
-------------------------------------------------------------------
Simon has a degree in "Informatika" (Information Science) from the
SIVEHO College in Antwerp, Belgium (1979 graduate). He has been working
in The Netherlands, Belgium, The United Kingdom, USA and Indonesia as an
MIS representative/ consultant ever since. Companies he has consulted
include Shell (Oil) BV, Fokker BV, MCI Telecommunications, US Department
Of State, Bank Rakyat Indonesia, European Office of the Indonesian Tin
Mining Company (EOMIN), etc. He has been using REXX since 1984 under
the following platforms: VM/CMS, PC/DOS, MVS/TSO, OS/2, and DOS/Windows.
He is currently working as a Software Re-engineer Consultant for various
companies advising and developing systems, mostly for prototypings,
tools integrations, systems optimization, and rapid & mass systems (re-)
engineering.
His forth-coming package "MyFiles" will utilize IBM's Visual REXX and
interface (using direct SQL access) with OS/2 ES Database Manager (DBM
and DB2/2).
For comments, tech-exchange, and/or more information, please send your
letter to:
Global Automation Company
325 S. Washington Ave. #94
Kent, WA 98032
U.S.A.
-------------------------------------------------------------------- */